<template>
  <div class="vindicate-list">
     <div class="vindicate-item" v-for="item in list" :key="item.id" @click="$router.push({
      query:{
        id : item.id
      },
      path:`ConfessionIndexPage_detail`
     })">
        <div class="avatar-name">
            <img :src="item.avatar" alt="" class="indicate-avatar">
            <div class="avatar-right">
                <p class="username">{{ item.nickname }}</p>
                <p class="time">{{ item.createTime }}</p>
            </div>
        </div>
        <p class="content">{{ item.content }}</p>
        <img v-if="item.images" src="@/assets/v2-fb360cf604fba14fef6bd3b6279295f0_720w.jpg" alt="" class="indicate-image">
     </div>
  </div>
</template>

<script>
export default {
    props: {
        list: {
            type: Array,
            default: []
        }
    },
    data() {
        return {

        }
    },
    methods: {

    }
}
</script>

<style lang="scss" scoped>
    .vindicate-list {
        display: flex;
        flex-wrap: wrap;
        padding: 10px;
        height: 600px;
        border: 1px solid red;
        .vindicate-item {
            width: 200px;
            height: 250px;
            margin-right: 30px;
            padding: 10px;
            background-color: #fff;
            .avatar-name {
                display: flex;
                .indicate-avatar {
                    width: 60px;
                    height: 60px;
                    border-radius: 50%;
                    box-shadow: 0px 0px 3px 1px rgba($color: #000000, $alpha: .2);
                }
                .avatar-right {
                    display: flex;
                    flex-direction: column;
                    justify-content: space-evenly;
                    margin-left: 10px;
                    .username {
                        font-weight: bold;
                    }
                    .time {
                        font-size: 12px;
                        color: gray;
                    }
                }
            }
            .content {
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                margin-top: 10px;
                font-size: 14px;
                line-height: 23px;
                color: #aba8a9;
            }
            .indicate-image {
                margin-top: 10px;
                width: 100%;
                height: 100px;
                border-radius: 10px;
            }
            &:hover{
            cursor: pointer;
            transition: all .5s;
            transform: translateY(-2px);
            box-shadow: 0 0 3px 1px rgba($color: #000000, $alpha: .1);
            }
        }
    }
</style>
